//
//  FurnitureCollectionCell.m
//  FKGW
//
//  Created by song ce on 2017/2/24.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "FurnitureCollectionCell.h"
#import "OSSHelper.h"
@implementation FurnitureCollectionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setModel:(FurnitureModel *)model{
    _model = model;
    self.nameLabel.text = _model.name;
    int w = (int)((Main_Screen_Width-2*10-2*18)/3);
    
     self.imageV.image = [UIImage imageNamed:@"icon_daishangjia_nor"];
    [[OSSHelper sharedHelper]OSSDownLoadWithObjectKey:_model.pic xOssProcess:[NSString stringWithFormat:@"image/resize,m_lfit,w_%d,h_%d",w,w]  downLoadBlock:^(NSData *data) {
        dispatch_async(dispatch_get_main_queue(), ^{
            self.imageV.image= [UIImage imageWithData:data];
        });
    }];
}

@end
